@import '@radix-ui/themes/styles.css';
@import '@radix-ui/colors/black-alpha.css';
@import '@radix-ui/colors/mauve.css';
@import '@radix-ui/colors/violet.css';

html,
body {
    padding: 0;
    margin: 0;
    font-family: Inter,
    -apple-system,
    BlinkMacSystemFont,
    Segoe UI,
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    Fira Sans,
    Droid Sans,
    Helvetica Neue,
    sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

.prose {
    max-width: 100vw;
}

/* reset */
button,
fieldset,
input {
    all: unset;
}

.DropdownMenuContent,
.DropdownMenuSubContent {
    min-width: 160px;
    background-color: white;
    border-radius: 6px;
    padding: 12px;
    box-shadow: 0px 10px 38px -10px rgba(22, 23, 24, 0.35), 0px 10px 20px -15px rgba(22, 23, 24, 0.2);
    animation-duration: 400ms;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.DropdownMenuContent[data-side='top'],
.DropdownMenuSubContent[data-side='top'] {
    animation-name: slideDownAndFade;
}

.DropdownMenuContent[data-side='right'],
.DropdownMenuSubContent[data-side='right'] {
    animation-name: slideLeftAndFade;
}

.DropdownMenuContent[data-side='bottom'],
.DropdownMenuSubContent[data-side='bottom'] {
    animation-name: slideUpAndFade;
}

.DropdownMenuContent[data-side='left'],
.DropdownMenuSubContent[data-side='left'] {
    animation-name: slideRightAndFade;
}

.DropdownMenuItem,
.DropdownMenuCheckboxItem,
.DropdownMenuRadioItem,
.DropdownMenuSubTrigger {
    font-size: 14px;
    line-height: 1.4;
    padding: 10px 5px;
    color: var(--violet-11);
    border-radius: 3px;
    display: flex;
    align-items: center;
    position: relative;
    user-select: none;
    outline: none;
    cursor: pointer;
}

.DropdownMenuSubTrigger[data-state='open'] {
    background-color: var(--violet-4);
    color: var(--violet-11);
}

.DropdownMenuItem[data-disabled],
.DropdownMenuCheckboxItem[data-disabled],
.DropdownMenuRadioItem[data-disabled],
.DropdownMenuSubTrigger[data-disabled] {
    color: var(--mauve-8);
    pointer-events: none;
}

.DropdownMenuItem[data-highlighted],
.DropdownMenuCheckboxItem[data-highlighted],
.DropdownMenuRadioItem[data-highlighted],
.DropdownMenuSubTrigger[data-highlighted] {
    background-color: var(--violet-9);
    color: var(--violet-1);
}

.DropdownMenuLabel {
    padding-left: 25px;
    font-size: 12px;
    line-height: 25px;
    color: var(--mauve-11);
}

.DropdownMenuSeparator {
    height: 1px;
    background-color: var(--violet-6);
    margin: 5px;
}

.DropdownMenuItemIndicator {
    position: absolute;
    left: 0;
    width: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.DropdownMenuArrow {
    fill: white;
}

.accordion-root {
    border-radius: 6px;
    box-shadow: 0 2px 10px var(--black-a4);
}

.accordion-item {
    overflow: hidden;
    margin-top: 1px;
    background-color: white;
}

.accordion-item:first-child {
    margin-top: 0;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.accordion-item:last-child {
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

.accordion-item:focus-within {
    position: relative;
    z-index: 1;
    box-shadow: 0 0 0 1px #da4167;
}

.accordion-header {
    display: flex;
}

.accordion-trigger {
    font-family: inherit;
    padding: 0 20px;
    height: 45px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 15px;
    line-height: 1;
    color: var(--violet-11);
    box-shadow: 0 1px 0 var(--mauve-6);
    background-color: white;
}

.accordion-trigger:hover {
    background-color: #03467d;
    color: white;
}

.accordion-content {
    overflow: hidden;
    font-size: 15px;
    color: var(--mauve-11);
    background-color: var(--mauve-2);
}

.accordion-content[data-state='open'] {
    animation: slideDown 300ms cubic-bezier(0.87, 0, 0.13, 1);
}

.accordion-content[data-state='closed'] {
    animation: slideUp 300ms cubic-bezier(0.87, 0, 0.13, 1);
}

.AccordionContentText {
    padding: 15px 20px;
}

.accordion-chevron {
    color: #d13167;
    transition: transform 300ms cubic-bezier(0.87, 0, 0.13, 1);
}

.accordion-trigger[data-state='open'] > .accordion-chevron {
    transform: rotate(180deg);
}

@keyframes slideDown {
    from {
        height: 0;
    }
    to {
        height: var(--radix-accordion-content-height);
    }
}

@keyframes slideUp {
    from {
        height: var(--radix-accordion-content-height);
    }
    to {
        height: 0;
    }
}

.is-active {
    background-color: var(--violet-3);
}

.DialogOverlay {
    background-color: var(--black-a9);
    position: fixed;
    inset: 0;
    animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
}

.DialogContent {
    background-color: white;
    border-radius: 6px;
    box-shadow: hsl(206 22% 7% / 35%) 0px 10px 38px -10px, hsl(206 22% 7% / 20%) 0px 10px 20px -15px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    max-width: 650px;
    max-height: 125vh;
    padding: 25px;
    animation: contentShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
}

.DialogContent:focus {
    outline: none;
}

.DialogTitle {
    margin: 0;
    font-weight: 500;
    color: var(--mauve-12);
    font-size: 17px;
}

.DialogDescription {
    margin: 10px 0 20px;
    color: var(--mauve-11);
    font-size: 15px;
    line-height: 1.5;
}

.Button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    padding: 0 15px;
    font-size: 15px;
    line-height: 1;
    font-weight: 500;
    height: 35px;
}

.Button.violet {
    background-color: white;
    color: var(--violet-11);
    box-shadow: 0 2px 10px var(--black-a7);
}

.Button.violet:hover {
    background-color: var(--mauve-3);
}

.Button.violet:focus {
    box-shadow: 0 0 0 2px black;
}

.Button.green {
    background-color: var(--green-4);
    color: var(--green-11);
}

.Button.green:hover {
    background-color: var(--green-5);
}

.Button.green:focus {
    box-shadow: 0 0 0 2px var(--green-7);
}

.IconButton {
    font-family: inherit;
    border-radius: 100%;
    height: 25px;
    width: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--violet-11);
    position: absolute;
    top: 10px;
    right: 10px;
}

.IconButton:hover {
    background-color: var(--violet-4);
}

.IconButton:focus {
    box-shadow: 0 0 0 2px var(--violet-7);
}

.Fieldset {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 15px;
}

.Label {
    font-size: 15px;
    color: var(--violet-11);
    width: 90px;
    text-align: right;
}

.Input {
    width: 100%;
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    padding: 0 10px;
    font-size: 15px;
    line-height: 1;
    color: var(--violet-11);
    box-shadow: 0 0 0 1px var(--violet-7);
    height: 35px;
}

.Input:focus {
    box-shadow: 0 0 0 2px var(--violet-8);
}

@keyframes overlayShow {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes contentShow {
    from {
        opacity: 0;
        transform: translate(-50%, -48%) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}


.TabsRoot {
    display: flex;
    flex-direction: column;
    margin-top: 2rem;
    box-shadow: 0 2px 10px var(--black-a4);
}

.TabsList {
    flex-shrink: 0;
    display: flex;
    border-bottom: 1px solid var(--mauve-6);
}

.TabsTrigger {
    font-family: inherit;
    background-color: white;
    padding: 0 20px;
    height: 45px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    line-height: 1;
    color: var(--mauve-11);
    user-select: none;
}

.TabsTrigger:first-child {
    border-top-left-radius: 6px;
}

.TabsTrigger:last-child {
    border-top-right-radius: 6px;
}

.TabsTrigger:hover {
    color: var(--violet-11);
}

.TabsTrigger[data-state='active'] {
    color: var(--violet-11);
    box-shadow: inset 0 -1px 0 0 currentColor, 0 1px 0 0 currentColor;
}

.TabsTrigger:focus {
    position: relative;
}

.TabsContent {
    flex-grow: 1;
    padding: 20px;
    background-color: white;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    outline: none;
}

.Text {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--mauve-11);
    font-size: 15px;
    line-height: 1.5;
}

.Fieldset {
    margin-bottom: 15px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.Label {
    font-size: 13px;
    line-height: 1;
    margin-bottom: 10px;
    color: var(--violet-12);
    display: block;
}

.Input {
    flex: 1 0 auto;
    border-radius: 4px;
    padding: 0 10px;
    font-size: 15px;
    line-height: 1;
    color: var(--violet-11);
    box-shadow: 0 0 0 1px var(--violet-7);
    height: 35px;
}

.Input:focus {
    box-shadow: 0 0 0 2px var(--violet-8);
}

.Button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    padding: 0 15px;
    font-size: 15px;
    line-height: 1;
    font-weight: 500;
    height: 35px;
}

.Button.green {
    background-color: var(--green-4);
    color: var(--green-11);
}

.Button.green:hover {
    background-color: var(--green-5);
}

.Button.green:focus {
    box-shadow: 0 0 0 2px var(--green-7);
}

.bb-editor-inner {
    margin-top: 1rem;
    max-width: fit-content;
}

.editor-block {
    width: fit-content;
    display: flex;
    justify-content: space-between;
}

.editor-section {
    width: 800px;
    height: 100%;
    min-height: 80vh;
}

.editor-main {
    margin: 0.5rem auto;
    padding: 1rem;
    flex-basis: 45%;
    border: 1px solid #0070f3;
}

.character-count {
    /*    shoulde display in right with flex*/
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: var(--mauve-11);
}

.character-count div {
    display: inline-block;
}

.empty-separator {
    width: 3rem;
}

.scene-text {
    font-size: 1.2rem;
    line-height: 1.5;
    color: var(--mauve-11);
}

.domain-buttons {
    max-width: 800px;
    margin: 1rem auto;
    flex-wrap: wrap;
    justify-content: center;
}

.domain-button {
    background-color: var(--violet-3);
    border-radius: 6px;
    padding: 0.2rem 2rem;
    margin-right: 0.2rem;
    font-size: 1rem;
    line-height: 1.5;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.domain-button:disabled {
    background-color: #eee;
    color: #fff;
    cursor: not-allowed;
}

.node-inline-completion {
    display: inline-block;
    background: var(--violet-3);
    padding: 0 8px;
    border-radius: 4px;
}

.node-inline-completion svg {
    display: inline-block;
}

.inline-completion {
    background-color: #9ca3af;
}

.inline-completion-tip {
    margin-left: 0.2em;
    background: #fff;
    font-weight: 500;
    border-radius: 0.2em;
    line-height: 0.6em;
    padding: 0 0.4em 0 0.3em;
}